{% extends 'base/base.html' %}
{% load static %}

{% block title %}
Add Engine Type
{% endblock title %}


{% block custom_js_css_link %}
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/forms/switches.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/custom.css' %}">
{{ form.media }}
<style media="screen">
.ace_editor {
	width:100%;
	height:450px;
	font-size:12px;
	border:1px solid #CCC;
}
.django-ace-toolbar{
	display: none;
}
</style>
{% endblock custom_js_css_link %}

{% block breadcrumb_title %}
Add new engine
{% endblock breadcrumb_title %}

{% block main_content %}
<div class="col-lg-12 layout-spacing">
    <div class="statbox widget box box-shadow">
        <div class="widget-header">
        	<div class="row">
                <div class="col-12">
                    <h4>Add Scan Engine Name</h4>
                    {{ form.errors }}
                    {{ form.non_field_errors }}
                </div>
            </div>
        </div>
        <div class="widget-content widget-content-area">
            <form class="simple-example" method="POST">
                {% csrf_token %}
                {% include "scanEngine/_items/form_engine.html" %}
                <button class="btn btn-primary submit-fn mt-2 float-right" type="submit">Add Engine</button>
            </form>
        </div>
    </div>
</div>
{% endblock main_content %}

{% block page_level_script %}
<script src="{% static 'assets/js/scrollspyNav.js' %}"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('.ace_editor').attr('id','editor');
	var editor = ace.edit("editor");
	editor.setValue(`subdomain_discovery:
    # available tools are Sublist3r, amass, assetfinder, subfinder
    # Usage of many tools may improve the results but also may take longer time to scan
    uses_tool: [ amass-passive, subfinder, sublist3r ]
    thread: 10
    # Your wordlist shortname for amass active enumeration, ignore if you are using passive enumeration
    wordlist: default
    # Get the shortname for the config file from configurations module
    amass_config: config_short_name

port_scan:
    # currently reNgine only supports naabu, nmap and other port scanning tools
    # will be made available in future release
    # scan_ports available options are top-100, top-1000, full or custom like
    # [80, 443]
    ports: [ top-100 ]
    # if you want to exclude certain ports, usage: exclude_ports: [80, 443]
    exclude_ports: null
    thread: 10

visual_identification:
    # currently runs aquatone
    # available options for ports are small, medium, large, xlarge
    port: xlarge
    thread: 2

subdomain_takeover:
    # only subjack is supported at this time
    thread: 1

dir_file_search:
    # currently supported dirsearch
    # list the file extensions to look for, extensions: [php, asp, txt]
    # recommended [ all ]
    extensions: [ php,asp,aspx,txt,conf,db,sql,json ]
    recursive: false
    recursive_level: 1
    thread: 100
    # use the shortname for wordlist here
    # default uses dirsearch default dicc.txt wordlist
    wordlist: default

fetch_url:
    # supported tools are gau and hakrawler
    # usage -> uses_tool: [ gau, hakrawler]
    uses_tool: [ gau, hakrawler ]
`);
	editor.clearSelection();
});
</script>
{% endblock page_level_script %}
